const { Sequelize } = require('sequelize');
const { MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB, MYSQL_TYPE } = require('../config/config.development')
const sequelize = new Sequelize(MYSQL_DB, MYSQL_USER, MYSQL_PASSWORD, {
    host: MYSQL_HOST,
    dialect: MYSQL_TYPE
})

// 测试数据库连接是否成功
//  sequelize.authenticate().then(() => console.log('Connection has been established successfully.'));
module.exports = sequelize;
